import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooUserWalletLogController } from '../../../controllers';
const uctoouserWalletLogRouter = new Router();
const userWalletLogController = new uctooUserWalletLogController();

uctoouserWalletLogRouter.post('/add', requireUser, userWalletLogController.add);
uctoouserWalletLogRouter.post('/edit', requireUser, rowLevelPermission('uctoo/user_wallet_log'), userWalletLogController.edit);
uctoouserWalletLogRouter.post('/del', requireUser, rowLevelPermission('uctoo/user_wallet_log'), userWalletLogController.delete);

//For getting userWalletLog with permission control
uctoouserWalletLogRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/user_wallet_log'), userWalletLogController.getSingle);
uctoouserWalletLogRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/user_wallet_log'), userWalletLogController.getMany);
uctoouserWalletLogRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/user_wallet_log'), userWalletLogController.getMany);

//#endregion AutoCreateCode
export default uctoouserWalletLogRouter;
